package com.example.smartclassroom.controller;

import com.example.smartclassroom.entity.Student;
import com.example.smartclassroom.model.MyResponseData;
import com.example.smartclassroom.service.StudentService;
import com.example.smartclassroom.service.impl.StudentSeiveceImpl;
import com.example.smartclassroom.util.JsonDate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("student/")
public class StudentController {
    @Autowired
    private StudentService studentService;

    /**
     * 编辑学生信息
     * @param student
     * @return
     */
    @PostMapping("edit")
    public JsonDate edit(@RequestBody Student student)
    {
        return studentService.update(student);
    }
}
